home *** CD-ROM | disk | FTP | other *** search
- Path: sixpints.demon.co.uk!tonyquin
- From: Tony Quinn <tonyquin@sixpints.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Help:what is wrong this code?
- Date: Sat, 6 Apr 1996 09:41:30 +0100
- Organization: Total lack of........
- Distribution: world
- Message-ID: <SXBJICA64iZxEwXW@sixpints.demon.co.uk>
- References: <4k3p3q$n76@brahms.udel.edu>
- NNTP-Posting-Host: sixpints.demon.co.uk
- X-NNTP-Posting-Host: sixpints.demon.co.uk
- MIME-Version: 1.0
- X-Newsreader: Turnpike Version 1.11 <bR0Ma7xWjrEPoFcpXTrm2Pl3jN>
-
- In article <4k3p3q$n76@brahms.udel.edu>, Yue-hong Zheng
- <yuehong@brahms.udel.edu> writes
- >
- >Why it give me 0.0000?
- >
- >#include <stdio.h>
- >main () {
- >double a=9.008;
- >printf("%f\n",sqrt(a));
- >return 0;
- >}
-
- Try adding the line "#include <math.h>" before main(). It works for me!
-
- --
- --------------------------------------------------------------------------------
- Tony Quinn --- The Voice of Insanity
- replies to tonyquin@sixpints.demon.co.uk
- --------------------------------------------------------------------------------
-